﻿package mortal.game.view.daily.view
{
    import Message.DB.Tables.*;
    import com.mui.controls.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class DailyTaskShowView extends DailyShowBaseView
    {
        private var _name:GTextFiled;
        private var _intr:GTextArea;
        private static var _instance:DailyTaskShowView;

        public function DailyTaskShowView()
        {
            return;
        }// end function

        override public function set data(param1:TDailyViewConfig) : void
        {
            super.data = param1;
            this._name.text = _data.name;
            this._intr.textField.textColor = GlobalStyle.colorLanUint;
            this._intr.htmlText = _data.description;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            this._name = UIFactory.gTextField("", 0, 149, 244, 20, this, GlobalStyle.textFormatChen.center());
            this._intr = UIFactory.textArea("", 0, 170, 245, 105, this);
            this._intr.wordWrap = true;
            this.bgUrl = ImagesConst.DailyTaskBg;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._name.dispose(param1);
            this._intr.dispose(param1);
            return;
        }// end function

        public static function get instance() : DailyTaskShowView
        {
            if (!_instance)
            {
                _instance = new DailyTaskShowView;
            }
            return _instance;
        }// end function

        public static function get hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
